using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class BND_PKT_LINKMap : EntityTypeConfiguration<BND_PKT_LINK>
    {
        public BND_PKT_LINKMap()
        {
            // Primary Key
            this.HasKey(t => t.SPID);

            // Properties
            this.Property(t => t.SPID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.RecordType)
                .HasMaxLength(50);

            this.Property(t => t.Name)
                .HasMaxLength(100);

            this.Property(t => t.Category)
                .HasMaxLength(50);

            this.Property(t => t.Object)
                .HasMaxLength(50);

            this.Property(t => t.Command)
                .HasMaxLength(250);

            this.Property(t => t.Param1)
                .HasMaxLength(50);

            this.Property(t => t.Param2)
                .HasMaxLength(50);

            this.Property(t => t.Param3)
                .HasMaxLength(50);

            this.Property(t => t.LinkType)
                .HasMaxLength(50);

            this.Property(t => t.CountSQL)
                .HasMaxLength(500);

            this.Property(t => t.Order)
                .HasMaxLength(10);

            this.Property(t => t.LinkOrder)
                .HasMaxLength(10);

            this.Property(t => t.Icon)
                .HasMaxLength(50);

            this.Property(t => t.Key1)
                .HasMaxLength(50);

            this.Property(t => t.Key2)
                .HasMaxLength(50);

            this.Property(t => t.Options)
                .HasMaxLength(100);

            this.Property(t => t.Key3)
                .HasMaxLength(50);

            this.Property(t => t.Key4)
                .HasMaxLength(50);

            this.Property(t => t.Key5)
                .HasMaxLength(50);

            this.Property(t => t.Key6)
                .HasMaxLength(50);

            this.Property(t => t.Name_A)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("BND_PKT_LINK");
            this.Property(t => t.SPID).HasColumnName("SPID");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.RecordType).HasColumnName("RecordType");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.Category).HasColumnName("Category");
            this.Property(t => t.Object).HasColumnName("Object");
            this.Property(t => t.Command).HasColumnName("Command");
            this.Property(t => t.Param1).HasColumnName("Param1");
            this.Property(t => t.Param2).HasColumnName("Param2");
            this.Property(t => t.Param3).HasColumnName("Param3");
            this.Property(t => t.LinkType).HasColumnName("LinkType");
            this.Property(t => t.CountSQL).HasColumnName("CountSQL");
            this.Property(t => t.Order).HasColumnName("Order");
            this.Property(t => t.Level).HasColumnName("Level");
            this.Property(t => t.Cnt).HasColumnName("Cnt");
            this.Property(t => t.LinkOrder).HasColumnName("LinkOrder");
            this.Property(t => t.Icon).HasColumnName("Icon");
            this.Property(t => t.Key1).HasColumnName("Key1");
            this.Property(t => t.Key2).HasColumnName("Key2");
            this.Property(t => t.Options).HasColumnName("Options");
            this.Property(t => t.Key3).HasColumnName("Key3");
            this.Property(t => t.Key4).HasColumnName("Key4");
            this.Property(t => t.Key5).HasColumnName("Key5");
            this.Property(t => t.Key6).HasColumnName("Key6");
            this.Property(t => t.Name_A).HasColumnName("Name_A");
        }
    }
}
